import request from "@/utils/request"

export function subjectImport() {
    return request({
        url: "/educational/subject/importTemplate",
        responseType:'blob',
        method:'get',
    })
}

export function subjectList(query){
    return request({
        url: "/educational/subject/list",
        method: "get",
        params: query
    });
}

export function subjectListByClass(query){
    return request({
        url: "/educational/subject/listByClassId/"+query,
        method: "get",
    });
}

export function subjectInfo(id) {
    return request({
        url: "/educational/subject/info/" + id,
        method: "get"
    });
}

export function getSubjectList() {
    return request({
        url: "/educational/subject/getSubjectList",
        method: "get"
    });
}

export function subjectAdd(data) {
    return request({
        url: "/educational/subject/add",
        method: "post",
        data
    });
}

export function subjectUpdate(id, data) {
    return request({
        url: "/educational/subject/update/" + id,
        method: "put",
        data: data
    });
}

export function subjectDelete(ids) {
    return request({
        url: "/educational/subject/deleteByIds/" + ids,
        method: "delete",
    });
}

// 新增和修改文件夹
export function editFolder(data) {
    return request({
        url: "/tExamTestpaper/editFolder",
        method: "post",
        data
    });
}

// 删除文件夹
export function deleteFolder(data) {
    return request({
        url: "/tExamTestpaper/deleteFolder",
        method: "post",
        data
    });
}

// 查询所有文件夹
export function findMysafeAllFolder(data) {
    return request({
        url: "/tExamTestpaper/findMysafeAllFolder",
        method: "post",
        data
    });
}

// 移动试卷到文件夹
export function changeToFolder(data) {
    return request({
        url: "/tExamTestpaper/changeToFolder",
        method: "post",
        data
    });
}
